<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent{
            position: relative;
        }
        .z-index1{
            background-color: yellow;
            z-index: 2;
            position: absolute;
            top: 0;
            left: 0;
        }
        .z-index2{
            background-color: red;
            z-index: 1;
            position: absolute;
            top: 50px;
            left: 50px;
        }
        .z{
            width: 100px;
            height: 100px;
        }
    </style>
</head>
<body>
    <div class="parent">
        <div class="z z-index1">111111111</div>
        <div class="z z-index2">222222222</div>
    </div>
</body>
</html>